import sys, os
sys.path.append(".")
from EasyHadoop import EasyHadoop
from utils.OptionParserUtil import *

"""
@author: ragrawal
@version: 1.0
@since: Mar 14, 2011
@summary: TODO 
"""

class Filter(EasyHadoop):
    """
    TODO: Describe class
    """
    
    def __init__(self, arguments):
        """
        Constructor 
        
        @param arguments: input options either from command line or set while initialization
        @type arguments: L{String} or L{List}
        """
        EasyHadoop.__init__(self, arguments)
       
        #TODO: add any custom initialization setps over here
    
    def set_mandatory(self):
        """set mandatory fields"""
        EasyHadoop.set_mandatory(self)
       
        #=======================
        #TODO: define mandatory options
        #Example:
        #self.mandatory.append('--input_delimiter')
        #self.mandatory.append('--output_delimiter')
        #=======================
        
    
    def set_commands(self):
        """Define custom options"""
        EasyHadoop.set_commands(self)
       
        #=======================
        #TODO: define options
        #Example:
        #self.parser.add_option("--debug", action="store_true", dest="debug", 
        #                        help="Print debug statements", default=False)
        #self.parser.add_option("--output-delimiter", action="store", 
        #                        dest="output_delimiter", type="string", 
        #                        help="Output delimiter", default="\t", nargs=1)
        #self.mandatory.append('--output_delimiter')
        #=======================        
        
        
    def get_description(self):
        """Custom description for help"""
       
        #=================
        #TODO: return descrption
        #================
    
    def get_usage(self):
        """Usage information"""
        return "Usage: python %prog [options]"
    
    def execute(self, line):
        """Execute defines what to do with the input line"""
        #=======================
        #TODO: Implement custom execution over here
        #======================
        
    
if __name__ == '__main__':
    cls = Filter(sys.argv)
    
